﻿using System.Diagnostics.CodeAnalysis;

namespace DimensionsHelper.Serialization.Constants;


/// <summary>
/// 用于标注目标对象属性、字段或参数适用的正则表达式筛选器。
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
public class ConstantTargetMatcherAttribute : Attribute
{

    public ConstantTargetMatcherAttribute([StringSyntax("Regex")] string regexExpression)
    {
        RegexExpression = regexExpression;
    }


    public string RegexExpression { get; }

}
